package com.fire.control.system.module.demo.controller.app;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.fire.control.system.module.common.controller.BaseController;
import com.fire.control.system.module.demo.service.impl.DemoService;
import com.fire.control.system.support.protocol.app.AppDemoRequest;
import com.fire.control.system.support.protocol.comman.DemoRequest;
import com.fire.control.system.support.protocol.comman.ResponseProtocol;


@RestController
@RequestMapping("app/demo")
public class AppDemoController extends BaseController{

	@Autowired DemoService demoService;
	
	@RequestMapping
	public ResponseProtocol test(@RequestBody AppDemoRequest req){
		ResponseProtocol protocol = demoService.findAll(req);
		System.out.println("当前用户ID:"+getUser().getUserId());
		return protocol;
	}
	
	@RequestMapping("a")
	public ResponseProtocol a(DemoRequest req){
		return demoService.getAll(req);
	}
	
	@RequestMapping("a/a")
	public ResponseProtocol aa(DemoRequest req){
		return demoService.getAll(req);
	}
	
	@RequestMapping("bbb")
	public ResponseProtocol bb(DemoRequest req){
		return demoService.getAll(req);
	}
	
	
}
